import 'package:flutter/material.dart';
import 'package:flutter_demo/Tools/event_bus.dart';
import 'package:flutter_demo/start_up/function_widgets/alerts/0x01_alert_dialog_routes.dart';



class EventBusPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {

    ebus.on("login", (arg) {
      alert(context, content: "Login info: $arg");
    });
    return Scaffold(
      appBar: AppBar(
        title: Text("Event Bus"),
      ),
      body: Center(
        child: FlatButton(
          child: Text("Login"),
          onPressed: () => ebus.emit("login", "Login success"),
        ),
      ),
    );
  }
}


